package com.jtpay.ysfproductionprocess.model;

/**
 * Description:
 * File: RemoteTaskModel.java
 * Author: Administrator
 * Create: 2018/08/17 09:34
 */
public class RemoteTaskModel {

    /**
     * {"taskType":1,"taskContent":{"money":1.00,"reason":"20180817093338300001"}}
     * <p>
     * taskType : 1
     * taskContent : {"money":1.00,"reason":"20180817093338300001"}
     */

    private int taskType;//“1”:生产 “2”:加密 3 订单信息解密

    private String money;
    private String reason;

    private String unionPayOrderId;

    private String en_content;

    private String time;

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public int getTaskType() {
        return taskType;
    }

    public void setTaskType(int taskType) {
        this.taskType = taskType;
    }

    public String getMoney() {
        return money;
    }

    public void setMoney(String money) {
        this.money = money;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public String getUnionPayOrderId() {
        return unionPayOrderId;
    }

    public void setUnionPayOrderId(String unionPayOrderId) {
        this.unionPayOrderId = unionPayOrderId;
    }

    public String getEn_content() {
        return en_content;
    }

    public void setEn_content(String en_content) {
        this.en_content = en_content;
    }

    //_type = 0 加密订单号，_type = 1 加密Header
    public int getDbType() {
        int type = 0;
        switch (taskType) {
            case 1://encrypt header
            case 3://decrypt order content
                type = 1;
                break;
            case 2:////encrypt order
            case 4://decrypt qr content
                type = 0;
                break;
        }
        return type;
    }

    @Override
    public String toString() {
        return "RemoteTaskModel{" +
                "taskType=" + taskType +
                ", money='" + money + '\'' +
                ", reason='" + reason + '\'' +
                ", unionPayOrderId='" + unionPayOrderId + '\'' +
                ", en_content='" + en_content + '\'' +
                '}';
    }
}
